<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RDoc::Parser::ChangeLog - rdoc: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Parser.html">RDoc::Parser</a>
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="Text.html">RDoc::Parser::Text</a>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-i-continue_entry_body">#continue_entry_body</a>
    <li ><a href="#method-i-create_document">#create_document</a>
    <li ><a href="#method-i-create_entries">#create_entries</a>
    <li ><a href="#method-i-create_items">#create_items</a>
    <li ><a href="#method-i-group_entries">#group_entries</a>
    <li ><a href="#method-i-parse_date">#parse_date</a>
    <li ><a href="#method-i-parse_entries">#parse_entries</a>
    <li ><a href="#method-i-scan">#scan</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RDoc::Parser::ChangeLog">
    <h1 id="class-RDoc::Parser::ChangeLog" class="class">
      class RDoc::Parser::ChangeLog
    </h1>

    <section class="description">
    
<p>A <a href="ChangeLog.html"><code>ChangeLog</code></a> file parser.</p>

<p>This parser converts a <a href="ChangeLog.html"><code>ChangeLog</code></a> into an <a href="../Markup/Document.html"><code>RDoc::Markup::Document</code></a>.  When viewed as HTML a <a href="ChangeLog.html"><code>ChangeLog</code></a> page will have an entry for each day’s entries in the sidebar table of contents.</p>

<p>This parser is meant to parse the MRI <a href="ChangeLog.html"><code>ChangeLog</code></a>, but can be used to parse any <a href="http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html">GNU style Change Log</a>.</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-continue_entry_body" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">continue_entry_body</span><span
                                class="method-args">(entry_body, continuation)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Attaches the <code>continuation</code> of the previous line to the <code>entry_body</code>.</p>

<p>Continued function listings are joined together as a single entry. Continued descriptions are joined to make a single paragraph.</p>

                              <div class="method-source-code" id="continue_entry_body-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">continue_entry_body</span> <span class="ruby-identifier">entry_body</span>, <span class="ruby-identifier">continuation</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">last</span> = <span class="ruby-identifier">entry_body</span>.<span class="ruby-identifier">last</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\)\s*\z/</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">continuation</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\A\(/</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">last</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp">/\)\s*\z/</span>, <span class="ruby-string">&#39;,&#39;</span>)
    <span class="ruby-identifier">continuation</span> = <span class="ruby-identifier">continuation</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/\A\(/</span>, <span class="ruby-string">&#39;&#39;</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\s\z/</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">continuation</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">continuation</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-create_document" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">create_document</span><span
                                class="method-args">(groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Creates an <a href="../Markup/Document.html"><code>RDoc::Markup::Document</code></a> given the <code>groups</code> of <a href="ChangeLog.html"><code>ChangeLog</code></a> entries.</p>

                              <div class="method-source-code" id="create_document-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create_document</span> <span class="ruby-identifier">groups</span>
  <span class="ruby-identifier">doc</span> = <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">omit_headings_below</span> = <span class="ruby-value">2</span>
  <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">file</span> = <span class="ruby-ivar">@top_level</span>

  <span class="ruby-identifier">doc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Heading</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">1</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@file_name</span>))
  <span class="ruby-identifier">doc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">BlankLine</span>.<span class="ruby-identifier">new</span>

  <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">sort_by</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span>,<span class="ruby-operator">|</span> <span class="ruby-identifier">day</span> <span class="ruby-keyword">end</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span>, <span class="ruby-identifier">entries</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">doc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Heading</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">day</span>.<span class="ruby-identifier">dup</span>)
    <span class="ruby-identifier">doc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">BlankLine</span>.<span class="ruby-identifier">new</span>

    <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">create_entries</span> <span class="ruby-identifier">entries</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">doc</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-create_entries" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">create_entries</span><span
                                class="method-args">(entries)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns a list of <a href="ChangeLog.html"><code>ChangeLog</code></a> entries an <a href="../Markup.html"><code>RDoc::Markup</code></a> nodes for the given <code>entries</code>.</p>

                              <div class="method-source-code" id="create_entries-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 66</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create_entries</span> <span class="ruby-identifier">entries</span>
  <span class="ruby-identifier">out</span> = []

  <span class="ruby-identifier">entries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span>, <span class="ruby-identifier">items</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Heading</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">entry</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">BlankLine</span>.<span class="ruby-identifier">new</span>

    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">create_items</span>(<span class="ruby-identifier">items</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">out</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-create_items" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">create_items</span><span
                                class="method-args">(items)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns an <a href="../Markup/List.html"><code>RDoc::Markup::List</code></a> containing the given <code>items</code> in the <a href="ChangeLog.html"><code>ChangeLog</code></a></p>

                              <div class="method-source-code" id="create_items-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 83</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create_items</span> <span class="ruby-identifier">items</span>
  <span class="ruby-identifier">list</span> = <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">List</span>.<span class="ruby-identifier">new</span> <span class="ruby-value">:NOTE</span>

  <span class="ruby-identifier">items</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">item</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\A(.*?(?:\([^)]+\))?):\s*/</span>

    <span class="ruby-identifier">title</span> = <span class="ruby-node">$1</span>
    <span class="ruby-identifier">body</span> = <span class="ruby-node">$&#39;</span>

    <span class="ruby-identifier">paragraph</span> = <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Paragraph</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">body</span>
    <span class="ruby-identifier">list_item</span> = <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">ListItem</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">paragraph</span>
    <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">list_item</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">list</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-group_entries" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">group_entries</span><span
                                class="method-args">(entries)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Groups <code>entries</code> by date.</p>

                              <div class="method-source-code" id="group_entries-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 103</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">group_entries</span> <span class="ruby-identifier">entries</span>
  <span class="ruby-ivar">@time_cache</span> <span class="ruby-operator">||=</span> {}
  <span class="ruby-identifier">entries</span>.<span class="ruby-identifier">group_by</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">title</span>, <span class="ruby-identifier">_</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">time</span> = <span class="ruby-ivar">@time_cache</span>[<span class="ruby-identifier">title</span>]
      (<span class="ruby-identifier">time</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">parse_date</span>(<span class="ruby-identifier">title</span>)).<span class="ruby-identifier">strftime</span> <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-constant">ArgumentError</span>
      <span class="ruby-identifier">time</span>, = <span class="ruby-identifier">title</span>.<span class="ruby-identifier">split</span> <span class="ruby-string">&#39;  &#39;</span>, <span class="ruby-value">2</span>
      <span class="ruby-identifier">parse_date</span>(<span class="ruby-identifier">time</span>).<span class="ruby-identifier">strftime</span> <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parse_date" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse_date</span><span
                                class="method-args">(date)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Parse date in ISO-8601, RFC-2822, or default of <a href="ChangeLog/Git.html"><code>Git</code></a></p>

                              <div class="method-source-code" id="parse_date-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 119</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse_date</span>(<span class="ruby-identifier">date</span>)
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">date</span>
  <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/</span>
    <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">$1</span>, <span class="ruby-node">$2</span>, <span class="ruby-node">$3</span>, <span class="ruby-node">$4</span>, <span class="ruby-node">$5</span>, <span class="ruby-node">$6</span>, (<span class="ruby-node">&quot;#{$7}:#{$8}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-node">$7</span>))
  <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/</span>
    <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">$3</span>, <span class="ruby-node">$2</span>, <span class="ruby-node">$1</span>, <span class="ruby-node">$4</span>, <span class="ruby-node">$5</span>, <span class="ruby-node">$6</span>, (<span class="ruby-node">&quot;#{$7}:#{$8}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-node">$7</span>))
  <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/</span>
    <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">$3</span>, <span class="ruby-node">$1</span>, <span class="ruby-node">$2</span>, <span class="ruby-node">$4</span>, <span class="ruby-node">$5</span>, <span class="ruby-node">$6</span>, (<span class="ruby-node">&quot;#{$7}:#{$8}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-node">$7</span>))
  <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A\s*\w{3} (\w{3}) +(\d+) (\d+):(\d+):(\d+) (\d+)\b/</span>
    <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">$6</span>, <span class="ruby-node">$1</span>, <span class="ruby-node">$2</span>, <span class="ruby-node">$3</span>, <span class="ruby-node">$4</span>, <span class="ruby-node">$5</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;bad date: #{date}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parse_entries" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse_entries</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Parses the entries in the <a href="ChangeLog.html"><code>ChangeLog</code></a>.</p>

<p>Returns an Array of each <a href="ChangeLog.html"><code>ChangeLog</code></a> entry in order of parsing.</p>

<p>A <a href="ChangeLog.html"><code>ChangeLog</code></a> entry is an Array containing the <a href="ChangeLog.html"><code>ChangeLog</code></a> title (date and committer) and an Array of <a href="ChangeLog.html"><code>ChangeLog</code></a> items (file and function changed with description).</p>

<p>An example result would be:</p>

<pre class="ruby">[ <span class="ruby-string">&#39;Tue Dec  4 08:33:46 2012  Eric Hodel  &lt;drbrain@segment7.net&gt;&#39;</span>,
  [ <span class="ruby-string">&#39;README.EXT:  Converted to RDoc format&#39;</span>,
    <span class="ruby-string">&#39;README.EXT.ja:  ditto&#39;</span>]]
</pre>

                              <div class="method-source-code" id="parse_entries-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 149</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse_entries</span>
  <span class="ruby-ivar">@time_cache</span> <span class="ruby-operator">||=</span> {}

  <span class="ruby-keyword">if</span> <span class="ruby-regexp">/\A((?:.*\n){,3})commit\s/</span> <span class="ruby-operator">=~</span> <span class="ruby-ivar">@content</span>
    <span class="ruby-keyword">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword">self</span>; <span class="ruby-identifier">prepend</span> <span class="ruby-constant">Git</span>; <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">parse_info</span>(<span class="ruby-node">$1</span>)
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">parse_entries</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">entries</span> = []
  <span class="ruby-identifier">entry_name</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">entry_body</span> = []

  <span class="ruby-ivar">@content</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">line</span>
    <span class="ruby-keyword">when</span> <span class="ruby-regexp">/^\s*$/</span> <span class="ruby-keyword">then</span>
      <span class="ruby-keyword">next</span>
    <span class="ruby-keyword">when</span> <span class="ruby-regexp">/^\w.*/</span> <span class="ruby-keyword">then</span>
      <span class="ruby-identifier">entries</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">entry_name</span>, <span class="ruby-identifier">entry_body</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">entry_name</span>

      <span class="ruby-identifier">entry_name</span> = <span class="ruby-node">$&amp;</span>

      <span class="ruby-keyword">begin</span>
        <span class="ruby-identifier">time</span> = <span class="ruby-identifier">parse_date</span> <span class="ruby-identifier">entry_name</span>
        <span class="ruby-ivar">@time_cache</span>[<span class="ruby-identifier">entry_name</span>] = <span class="ruby-identifier">time</span>
      <span class="ruby-keyword">rescue</span> <span class="ruby-constant">ArgumentError</span>
        <span class="ruby-identifier">entry_name</span> = <span class="ruby-keyword">nil</span>
      <span class="ruby-keyword">end</span>

      <span class="ruby-identifier">entry_body</span> = []
    <span class="ruby-keyword">when</span> <span class="ruby-regexp">/^(\t| {8})?\*\s*(.*)/</span> <span class="ruby-keyword">then</span> <span class="ruby-comment"># &quot;\t* file.c (func): ...&quot;</span>
      <span class="ruby-identifier">entry_body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">$2</span>.<span class="ruby-identifier">dup</span>
    <span class="ruby-keyword">when</span> <span class="ruby-regexp">/^(\t| {8})?\s*(\(.*)/</span> <span class="ruby-keyword">then</span> <span class="ruby-comment"># &quot;\t(func): ...&quot;</span>
      <span class="ruby-identifier">entry</span> = <span class="ruby-node">$2</span>

      <span class="ruby-keyword">if</span> <span class="ruby-identifier">entry_body</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/:/</span> <span class="ruby-keyword">then</span>
        <span class="ruby-identifier">entry_body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">dup</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">continue_entry_body</span> <span class="ruby-identifier">entry_body</span>, <span class="ruby-identifier">entry</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">when</span> <span class="ruby-regexp">/^(\t| {8})?\s*(.*)/</span> <span class="ruby-keyword">then</span>
      <span class="ruby-identifier">continue_entry_body</span> <span class="ruby-identifier">entry_body</span>, <span class="ruby-node">$2</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">entries</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">entry_name</span>, <span class="ruby-identifier">entry_body</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">entry_name</span>

  <span class="ruby-identifier">entries</span>.<span class="ruby-identifier">reject!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span>(<span class="ruby-identifier">entry</span>,<span class="ruby-identifier">_</span>)<span class="ruby-operator">|</span>
    <span class="ruby-identifier">entry</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">entries</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-scan" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">scan</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Converts the <a href="ChangeLog.html"><code>ChangeLog</code></a> into an <a href="../Markup/Document.html"><code>RDoc::Markup::Document</code></a></p>

                              <div class="method-source-code" id="scan-source">
            <pre><span class="ruby-comment"># File rdoc/parser/changelog.rb, line 206</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">scan</span>
  <span class="ruby-ivar">@time_cache</span> = {}

  <span class="ruby-identifier">entries</span> = <span class="ruby-identifier">parse_entries</span>
  <span class="ruby-identifier">grouped_entries</span> = <span class="ruby-identifier">group_entries</span> <span class="ruby-identifier">entries</span>

  <span class="ruby-identifier">doc</span> = <span class="ruby-identifier">create_document</span> <span class="ruby-identifier">grouped_entries</span>

  <span class="ruby-ivar">@top_level</span>.<span class="ruby-identifier">comment</span> = <span class="ruby-identifier">doc</span>

  <span class="ruby-ivar">@top_level</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

